package com.qf.day07.weapon;

public class LongSword extends Weapon{
    private int criticalStrike;//暴击力

    public LongSword() {
    }

    public LongSword(int criticalStrike) {
        this.criticalStrike = criticalStrike;
    }

    public LongSword(String name, int attack, int criticalStrike) {
        super(name, attack);
        this.criticalStrike = criticalStrike;
    }

    /**
     * 获取
     * @return criticalStrike
     */
    public int getCriticalStrike() {
        return criticalStrike;
    }

    /**
     * 设置
     * @param criticalStrike
     */
    public void setCriticalStrike(int criticalStrike) {
        this.criticalStrike = criticalStrike;
    }

    @Override
    public String toString() {
        return   super.toString()+'\t'+'\t'+'\t'+"LongSword{" +
                "criticalStrike=" + criticalStrike +
                "} ";
    }
}
